﻿<%@ Control Language="C#" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.Common.Controls" Assembly="Hidistro.UI.Common.Controls" %>
<%@ Import Namespace="Hidistro.Core" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.AccountCenter.CodeBehind" Assembly="Hidistro.UI.AccountCenter.CodeBehind" %>

<script>
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }
    $(function () {
        var os = getQueryString("orderStatus");
        $("#hftype").val(os);
        $("#uldd li").removeClass("order_right_s");
        if (os == 1) {
            $("#uldd li:eq(1)").addClass("order_right_s");
        }
        else if (os == 2) {
            $("#uldd li:eq(2)").addClass("order_right_s");
        }
        else if (os == 3) {
            $("#uldd li:eq(3)").addClass("order_right_s");
        }
        else {
            $("#uldd li:eq(0)").addClass("order_right_s");
        }
        $(".return_right_progresss_bottom").each(function () {
            var ullenght = $(this).children('ul').length;
            if (ullenght > 1) {
                $(this).children('ul:gt(0)').find("li:gt(4)").text("");
            }
        });
        $(".return_right_progresss_top_right a").css("color", "black");
        var ordercount = $(".return_right_progresss").length;
        if (ordercount == 0) {
            $(".saged").show();
        }
    });
    function confirms() {
        if (confirm("确认关闭该订单吗？")) {
            return true;
        }
        else {
            return false;
        }
    };
</script>
 <div class="order_right_top clearfix">
                <p>
                    <asp:HiddenField runat="server" ID="hftype"/>
                    <asp:TextBox ID="txtKeyWord" runat="server" class="order_right_top_text" />
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" class="order_right_top_btn" />
                </p>
            </div>
            <div class="order_right_nav clearfix">
                <ul id="uldd">
                    <li class="order_right_s"><a href="/user/UserOrders.aspx">所有订单</a></li>
                    <li><a href="/user/UserOrders.aspx?orderStatus=1">待付款<%--<span> 0</span>--%></a></li>
                    <li><a href="/user/UserOrders.aspx?orderStatus=2">待发货<%--<span> 0</span>--%></a></li>
                    <li><a href="/user/UserOrders.aspx?orderStatus=3">待收货<%--<span> 0</span>--%></a></li>
                </ul>
            </div>
            <div class="return_right_mainbav clearfix">
                <ul>
                    <li class="right_mainbav1">宝贝</li>
                    <li class="right_mainbav2">单价（元）</li>
                    <li class="right_mainbav3">数量</li>
                    <li class="right_mainbav4">商品操作</li>
                    <li class="right_mainbav5">实付款（元）</li>
                    <li class="right_mainbav6">交易状态</li>
                    <li class="right_mainbav7">交易操作</li>

                </ul>
            </div>

<asp:Repeater ID="rptOrderlist" runat="server">
    <ItemTemplate>
        <div class="return_right_progresss clearfix">
        <div class="return_right_progresss_top">
           <div class="return_right_progresss_top_left">
           <%--<input name="" type="checkbox" value="">--%>
           <p><span><%#Eval("OrderDate")!=null&&Eval("OrderDate").ToString()!=""?DateTime.Parse(Eval("OrderDate").ToString()).ToString("yyyy-MM-dd"):"" %></span>   订单号：<i><%#Eval("OrderId") %></i></p>
           </div>
           <div class="return_right_progresss_top_right">
           <%--<a href="#"><img src="http://image.juseshop.com/images\/newindex/return_shanchu.png"></a>--%>
               
               <asp:ImageButton ID="lkbtnCloseOrder" runat="server" CommandArgument='<%# Eval("OrderId") %>' CommandName="CLOSE_TRADE" IsShow="true" OnClientClick="return confirms()" Visible="false" ImageUrl='http://image.juseshop.com/images\/newindex/return_shanchu.png'></asp:ImageButton>
           </div>
     
        </div>
        <div class="return_right_progresss_bottom clearfix">
            <asp:Repeater ID="rptOrderlistSon" runat="server">
                <ItemTemplate>
                    <ul>
          <li class="right_progresss1"> <a href="<%#Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { Eval("ProductId"), Eval("CategoryUrl") })%>" target="_blank">
                                        <img data-original="<%#Globals.GetImgUrl(Eval("ThumbnailsUrl").ToString())%>">
                                    <p><%#Eval("ProductName") %></p></a></li>
          <li class="right_progresss2"><p><%#((decimal)Eval("ItemListPrice")).ToString("F0") %></p></li>
          <li class="right_progresss3"><p><%#Eval("Quantity") %></p></li>
          <li class="right_progresss4"><%--<a href="#"><p>退换/退款</p></a>--%></li>
          <li class="right_progresss5"><p><%#((decimal)Eval("TrueCost")).ToString("f2") %></p></a></li>
                        <li class="order_progresss6"><p><%# Hidistro.Entities.Orders.OrderInfo.GetOrderStatusName((Hidistro.Entities.Orders.OrderStatus) Eval("OrderStatus")) %></p>
                            <p class="progresss_one"><asp:HyperLink ID="hlinkOrderDetails" runat="server" NavigateUrl='<%# Globals.GetSiteUrls().UrlData.FormatUrl("user_OrderDetails",Eval("orderId"))%>' Text="订单详情" /><%--<a href="#">订单详情</a>--%></p></li>
                        <li class="order_progresss7">
                            <p><a href="javascript:void(0)" class="progresss_red"  onclick="return paySelect(this)"  runat="server" oId='<%# Eval("OrderId") %>' pId='<%# Eval("PaymentTypeId") %>' ID="hlinkPay" Visible="false">立即付款</a></p>
                            <%--<p><a href="#">取消订单</a></p>--%>
                        <p><a href="<%#Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { Eval("ProductId"), Eval("CategoryUrl") })%>" target="_blank">再次购买</a></p>    
                        </li>
        </ul>
                </ItemTemplate>
            </asp:Repeater>	
        </div>
     </div>
     </ItemTemplate>
</asp:Repeater>	
<div class="saged" style="color:#b4b4b4;width:1080px;text-align:center; display:none; line-height: 300px;height: 300px;">
   	<img src="http://image.juseshop.com/images\/newindex/awerhsdh.png" style="vertical-align:middle;">
   	您买的东西太少了，这里都空空的，快去挑选合适的商品吧！
   </div>

            <div class="pagination">
                <UI:Pager runat="server" ShowTotalPages="true" ID="pager" />
            </div>


